<script setup>
import {ref} from 'vue'
import {useRoute,onBeforeRouteUpdate} from 'vue-router'

const route = useRoute()
const name =ref("jk1997")
// console.log(route.query)
const  size = ref(route.query.size)
const  page = ref(route.query.size)
onBeforeRouteUpdate((to,from)=>
{
  size.value = to.query.size || 0
  page.value = to.query.page || 0

})
// export default {
//   name: "CourseView"
// }
</script>

<template>
  <div>
    这是课程页面
    {{name}}
  </div>
  <div>{{size}}</div>
  <div>{{page}}</div>
</template>

<style scoped>

</style>